<template>
  <div class="welcome">
    <House />
  </div>
</template>
<script lang="ts">
  import { defineComponent,reactive,watch,ref,toRef } from 'vue';
  import House from '../house/index.vue';
  export default defineComponent({
    name: 'Welcome',
    components: { House },
    setup(){
        const state:any = reactive({count:1})
        const count = toRef(state,'count')
        watch(count, () => {
            console.log(1)
        })
        setTimeout(()=>{
            state.count = 0
            console.log(state)
        },1000)
        return {

        }
    }
  });
</script>
<style lang="less" scoped>
  .welcome {
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
  }
</style>
